import axios from "../config.js";

/**
 * 登录
 * @returns {Promise<unknown>}
 */
export const login = data => {
    return axios({
        url: "/user/login",
        method: "post",
        data
    });
};
/**
 * 注册
 * @returns {Promise<unknown>}
 */
export const register = data => {
  return axios({
    url: "/user/register",
    method: "post",
    data
  });
};
export const checkToken = data => {
    return axios({
      url: "/user/checkToken",
      method: "get",
      params: data
    });
  };
